#ifndef WRITER_H
#define WRITER_H

#define BUFFER_SIZE 33

#include <iostream>
#include <string>
#include <vector>
#include <fstream>

#include <boost\date_time.hpp>
#include "Task.h"

using namespace std;
using namespace boost::posix_time;

class Writer {
private:
	string filename;
	char buffer [BUFFER_SIZE];
	void parseData(ifstream& file, vector<Task>& taskList);
	bool convertToBool(string line);
	Task::TaskType convertToTaskType(string line);
	string convertInt(int number);
public:
	Writer(string _filename);

	Writer();

	bool write(vector<Task> taskList);
	bool read(vector<Task>& taskList);

};

#endif